<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>首页 - Online Judge</title>
    <link rel="stylesheet" href="/css/index.css">
</head>

<body>
    <!-- 导航栏 -->
    <nav class="navbar">
        <h1>📚 Online Judge</h1>
        <div class="nav-links">
            <a href="/">首页</a>
            <a href="/all_questions">题库</a>
            <a href="/ranking.html">排行榜</a>
        </div>
        <div class="user-info" id="userInfo" style="display: none;">
            <span>欢迎，<span class="username" id="navUsername"></span></span>
            <a href="/user.html">我的主页</a>
            <button onclick="logout()">登出</button>
        </div>
        <div id="loginLink">
            <a href="/login.html">登录</a>
        </div>
    </nav>

    <!-- 主内容区 -->
    <div class="hero-section">
        <div class="hero-content">
            <h1>欢迎来到我的OnlineJudge平台</h1>
            <p class="subtitle">这是我个人独立开发的一个在线OJ平台</p>
            <a href="/all_questions" class="btn-start">点击我开始编程吧！</a>
            
            <div class="features">
                <div class="feature-item">
                    <div class="feature-icon">💻</div>
                    <h3>在线编程</h3>
                    <p>支持多种编程语言</p>
                </div>
                <div class="feature-item">
                    <div class="feature-icon">🏆</div>
                    <h3>实时排名</h3>
                    <p>查看你的排名和进度</p>
                </div>
                <div class="feature-item">
                    <div class="feature-icon">📊</div>
                    <h3>数据统计</h3>
                    <p>跟踪你的提交记录</p>
                </div>
            </div>
        </div>
    </div>

    <script src="/js/auth.js"></script>
</body>
</html>